<script>
	var jweixin = require('@/common/jweixin.js');
	export default {
		onLaunch: function() {
			this.getWxConfig();
			// console.log('App Launch')
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		},
		data() {
			return {

			}
		},
		globalData: {
			isUniModel: 0,
			isStayOnline: 0,
		},
		methods: {
			getWxConfig() {
				uni.$u.api.getWxConfig({
					url: window.location.href.split('#')[0],
				}).then(res => {
					jweixin.config({
						debug: false, // 调试时可开启
						appId: res.appId,
						timestamp: res.timestamp,
						nonceStr: res.nonceStr,
						signature: res.signature,
						jsApiList: ['chooseImage'],
						openTagList: ['wx-open-launch-weapp'],
					})
				})
			},
		},
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */

	page {
		width: 100%;
		max-width: 100%;
	}

	.container {
		min-height: 100vh;
		background: #F5F5F5;
		color: #333333;
	}

	.bg-fff {
		background: #FFFFFF;
	}
	
	.flex {
		display: flex;
	}
	
	.flex-center {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.flex-column-center {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.flex-align-center {
		display: flex;
		align-items: center;
	}

	.flex-space-between {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.flex-column-space-between {
		display: flex;
		justify-content: space-between;
		flex-direction: column;
	}
	
	.flex-column-space-between-center {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-direction: column;
	}

	.flex-wrap {
		display: flex;
		flex-wrap: wrap;
	}
</style>
